package com.zhongke.cotrun.model.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhongke.cotrun.model.validator.UserValidator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigInteger;
import java.util.Date;

@Data
@ApiModel(value = "用户积分添加记录")
public class UserIntegralHistory {
    //用户积分添加记录
    @ApiModelProperty(value = "用户积分历史记录id", example = "123")
    private BigInteger userIntegralId; //用户积分历史记录id
    @ApiModelProperty(value = "积分类型id号", example = "123")
    @NotNull(message = "积分类型id不能为空",groups = {UserValidator.InSet.class})
    private Integer intergralNameId;  //积分类````型id号
    @ApiModelProperty(value = "积分规则id号", example = "123")
    @NotNull(message = "积分规则id不能为空",groups = {UserValidator.InSet.class})
    private Integer integralRecordId;//积分规则id<新增>
    @NotNull(message = "所属一级分类id不能为空",groups = {UserValidator.InSet.class})
    private Integer rankOneOf;//所属一级分类
    @NotNull(message = "所属二级分类id不能为空",groups = {UserValidator.InSet.class})
    private Integer rankTwoOf;//所属二级分类
    @ApiModelProperty(value = "新增积分值", example = "123")
    @NotNull(message = "积分值不能为空",groups = {UserValidator.InSet.class})
    private String integralValue; //积分值
    @ApiModelProperty(value = "历史积分说明", example = "123")
    @NotNull(message = "积分历史说明不能为空",groups = {UserValidator.InSet.class})
    private String historyExplain;//积分历史说明
    @ApiModelProperty(value = "创建时间", example = "2020-10-3")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;           //创建时间

    @ApiModelProperty(value = "所属用户id号", example = "12")
    @NotNull(message = "所属用户id号不能为空",groups = {UserValidator.InSet.class})
    private Integer userId;          //所属用户id号

    @ApiModelProperty(value ="查所有的正值", example = "收入")
    private String income;//收入
    @ApiModelProperty(value ="查所有的负值", example = "支出")
    private String expenditure;//支出

    @ApiModelProperty(value ="查询近几个月的值", example = "3")
    private Integer time;//查询时间段


    private UserInfo userInfo;//关联 的用户信息
    private CompanyInfo companyInfo;//关联公司信息

    private String keyWord;//搜索关键字
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startTime;//搜索开始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private  Date endTime;
}
